// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
// 图片懒加载
import VueLazyload from 'vue-lazyload'

// mockjs
import './mock/usermock.js'
//商品数据mock
import './mock/productmock.js'
//初始化样式
import '../static/css/common.css'


import 'amfe-flexible'
//axios
import Axios from 'axios'
//挂载在vue原型 prototype 中
Vue.prototype.$axios = Axios

//vant组件
import Vant from 'vant';
import 'vant/lib/index.css';

Vue.use(Vant);
//element ui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);

//mint ui
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'

Vue.use(MintUI)

//vuex
import { store } from './store/store'

//vant
import { CountDown } from 'vant';

Vue.use(CountDown);


// VueLazyload
Vue.use(VueLazyload)

// or with options
const loadimage = require('./assets/logo.png')
const errorimage = require('./assets/logo.png')

Vue.use(VueLazyload, {
    preLoad: 1.3,
    error: errorimage,
    loading: loadimage,
    attempt: 1
})




Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    components: { App },
    template: '<App/>'
})